package unit5.part8;

public class StaticInnerTest {
    public static void main(String[] args) {
        Outer2.Tyre tyre = new Outer2.Tyre(17);
        Outer2.Light light = new Outer2.Light(8);
        Outer2 outer2 = new Outer2();
        outer2.construct(tyre, light);
    }
}

class Outer2 {// 汽车

    static class Tyre {// 汽车轮胎
        private int width;

        public Tyre(int width) {
            this.width = width;
        }
    }

    static class Light {// 汽车灯
        private int brightness;

        public Light(int brightness) {
            this.brightness = brightness;
        }
    }

    public void construct(Tyre tyre, Light light) {
        System.out.println("轮胎宽度：" + tyre.width + "，灯亮度：" + light.brightness);
    }
}
